From 56233085ef09f9a6b64a1676c1d1472d46fba897 Mon Sep 17 00:00:00 2001 From: "emellor@leeni.uk.xensource.com" Date: Mon, 12 Dec 2005 11:15:29 +0000 Subject: [PATCH] Remove unused netmask,network etc. These were used when we called ifconfig to set up the networking, but now that we use ip directly, we don't need them, and they were in any case broken when the ip address was specified without a suffix. This work is by James Dykman . Signed-off-by: Ewan Mellor --- tools/examples/vif-nat | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tools/examples/vif-nat b/tools/examples/vif-nat index 9ce79f0434..f56234a7a1 100644 --- a/tools/examples/vif-nat +++ b/tools/examples/vif-nat @@ -81,17 +81,6 @@ router_ip=$(routing_ip "$ip") # Split the given IP/bits pair. vif_ip=`echo ${ip} | awk -F/ '{print $1}'` -bits=`echo ${ip} | awk -F/ '{print $2}'` - -# Convert $bits and $vif_ip to integers, mask appropriately to get a network -# address, and convert them both to dotted quads. - -intmask=$(( (0xFFFFFFFF << (32 - $bits)) & 0xFFFFFFFF )) -vif_int=$(( $(echo "((($vif_ip" | sed -e 's#\.#)\*256\+#g') )) - -netmask=$(dotted_quad $intmask) -network=$(dotted_quad $(( $vif_int & $intmask )) ) - hostname=$(xenstore_read "$XENBUS_PATH/domain" | tr -- '_.:/+' '-----') if [ "$vifid" != "1" ] -- 2.30.2